﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Blog.Models;
using BlogModel;
using BlogModel.DAL;

namespace Blog.Controllers
{
    public class UserController : Controller
    {
        public ActionResult Index()
        {
            return View(UserDB.GetUsers());
        }

        public ActionResult FullDetails(int id)
        {
            UserSiteModel userSiteModel = new UserSiteModel();
            userSiteModel.Users = UserDB.GetUserOnUserId(id);
            userSiteModel.Blogs = BlogDB.GetBlogOnUserId(id);
            userSiteModel.Posts = PostDB.GetPostsByUserId(id);
            userSiteModel.BlogRolls = BlogRollDB.GetBlogRollsOnUserId(id);
            return View(userSiteModel);
        }

    }
}

